Ext.define('HIT.view.ReportTaskPanel', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.reporttaskpanel',

    cls: 'custom-grid',
    frame: false,
    width: 1200,
    columnLines: false,
    store: 'ReportTask',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            columns: [
                {
                    xtype: 'rownumberer',
                    resizable: true,
                    width: 30
                },  
                {
                    xtype: 'gridcolumn',
                    width: 100,
                    align: 'center', 
                    dataIndex:'report_name',
                    text: Share.T('报表名称')
                },
                {
                    xtype: 'gridcolumn',
                    width: 100,
                    align: 'center', 
                    dataIndex:'report_creator',
                    text: Share.T('创建者')
                },                            
                {
                    xtype: 'gridcolumn',
                    align: 'center', 
                    width: 140,
                    dataIndex: 'stime',
                    text: Share.T('创建时间')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'center', 
                    width: 140,
                    dataIndex: 'etime',
                    text: Share.T('生成时间')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'center', 
                    width: 120,
                    dataIndex: 'report_state',
                    text: Share.T('状态')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'left',
                    style:'text-align:center;', 
//                    flex: 0.5,
                    width : 180,
                    dataIndex: 'pdf_download',
                    text: Share.T('ＰＤＦ下载链接')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'left',
                    style:'text-align:center;',
//                    flex: 0.5,
                    width : 180,
                    dataIndex: 'excel_download',
                    text: Share.T('ＥＸＣＥＬ下载链接')
                },
                {
                	xtype: 'gridcolumn',
                	align: 'left',
                	style:'text-align:center;',
                	width: 400,
                	dataIndex: 'Detail',
                	text: Share.T('详细信息')
                }
            ],
            viewConfig: {
            	enableTextSelection:true
            },
            selModel: Ext.create('Ext.selection.CheckboxModel', {
                checkOnly: false
            }),
//            plugins :[{ptype:"rowselectionpaging"}],
            dockedItems: [
                {
                    xtype: 'pagingtoolbar',
                    dock: 'bottom',
                    width: 360,
                    inputItemWidth:45,
                    displayInfo: true,
                    store:'ReportTask',
                    plugins: [{
                        ptype: "pagesize",
                        uxPageSize: page_size}]
                }
            ]
        });

        me.callParent(arguments);
    }

});